import 'package:flutter/material.dart';
import 'package:flutter_app/components/layout.dart';
import 'package:flutter_app/generated/l10n.dart';
Widget Item(String text,{String img,String rightText}) {
  return Padding(
    padding: const EdgeInsets.symmetric(vertical: 15.0),
    child: RowBetween(children: [
      Row(
        children: [
          Image.asset(img,width: 20,),
          SizedBox(
            width: 10.0,
          ),
          Text(text,style: TextStyle(fontSize: 15),)
        ],
      ),
      Row(
        children: [
          Text(rightText??'',style: TextStyle(color: Colors.grey,fontSize: 15),),
          SizedBox(
            width: 10.0,
          ),
          Icon(
            Icons.arrow_forward_ios_outlined,
            size: 15,
            color: Colors.grey,
          ),
        ],
      )
    ]),
  );
}

class HelpPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      //help 帮助与社群
      appBar: DarkHeadBar(S.of(context).help),
      body: Padding(
        padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0),
        child: Column(
          children: [
            //使用帮助
            Item(S.of(context).faq,img:'assets/images/ic_faq.png'),
            //在线客服
            Item(S.of(context).online_service,img:'assets/images/ic_online_service.png'),
            //电话客服
            Item(S.of(context).phone_service,img:'assets/images/ic_phone_service.png'),
            SizedBox(height: 20),
            Item('Telegram',img:'assets/images/ic_telegram.png',rightText:'Matrixport'),
            Item('Twitter',img:'assets/images/ic_twitter.png',rightText:'realMatrixport'),
            Item('Facebook',img:'assets/images/ic_facebook.png',rightText:'Matrixport'),
            Item('Weibo',img:'assets/images/ic_weibo.png',rightText:'Matrixport'),
          ],
        ),
      ),
    );
  }
}
